namespace ScrumSprintMonitor.Infrastructure
{
	#region #using Directives

	using System;
	using System.Collections.Generic;
	using System.ComponentModel;

	#endregion

	public interface IWorkItemStore
	{
		BindingList<IWorkItemAdapter> WorkItems { get; }

		event EventHandler<RefreshResultsEventArgs> WorkItemsRefreshed;
		event EventHandler WorkItemsUpdated;

		void Refresh();

		IEnumerable<IWorkItemAdapter> GetWorkItemsAtDateWhere(DateTime at, Predicate<IWorkItemAdapter> predicate);
	}

	public class RefreshResultsEventArgs : EventArgs
	{
		public RefreshResultsEventArgs(Exception e)
		{
			Exception = e;
		}

		public Exception Exception { get; private set; }
	}
}